/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package GUIComponents.Menu;

import MainClasses.main;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JMenu;
import javax.swing.JMenuItem;

/**
 *
 * @author andrewcutler
 */
public class EventMenu extends JMenu{
    
    public EventMenu()
    {
        super("Event");
        
        JMenuItem add    = new JMenuItem("Add Event");
        add.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent arg0) {
                main.initAddEventFrame();
            }
            
        });
        
        JMenuItem delete = new JMenuItem("Delete Event");
        delete.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0)
            {
                main.initDeleteEventFrame();
            }
        });
        
        JMenuItem list   = new JMenuItem("List Events");
       list.addActionListener(new ActionListener() {
           public void actionPerformed(ActionEvent arg0)
           {
               main.listEvents();
           }
       });
        
       
       this.add(add);
       this.add(delete);
       this.add(list);
        
    }

}
